<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.hs.pre.page.PageUtil,com.hs.pre.model.SortBean"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>分类列表</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<LINK href="<%=basePath%>/app/css/default.css" type=text/css
			rel=stylesheet>
	</head>

	<body>
		<%@ include file="../tablehead.jsp"%>
		<%
			PageUtil pageUtil = (PageUtil) request.getAttribute("pageUtil");
			if (pageUtil == null)
				pageUtil = new PageUtil();
			List list = pageUtil.getResultList();
			if (list == null)
				list = new ArrayList();
		%>
		<table cellSpacing=0 align=right cellPadding=0 border=0>
			<tr heigth="5px">
				<td>
					<br>
				</td>
			</tr>
			<tr>
				<td align="right">
					<a href="app/search/index2.jsp"><img cellPadding=0 border=0 alt="返回" src="app/images/re.jpg" /></a>
				</td>
			</tr>
			<tr>
				<td>
					<DIV class=tab>
						<table
							style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all; TEXT-ALIGN: justify"
							width=80% cellSpacing=0 cellPadding=0 border=0>
							<tbody>
								<TR class=top>
									<TD colspan="6">
										<font color="red">请选择下面分类!</font>
									</TD>
								</TR>
								<%
									Iterator iterator = list.iterator();
									int i = 0;
									while (iterator.hasNext()) {
								%>
								<tr align=center
									bgColor=<%if(i%2 == 0){out.println("#fffbff");}else{out.println("#eef1f9");} %>>
									<%
										SortBean sortBean = (SortBean) iterator.next();
									%>
									<td>
										&nbsp;<a href="app/pre/search.do?q=0&sortId=<%=sortBean.getSortId() %>"><%=sortBean.getSortName()%></a></td>
									<%
										for (int si = 0; si < 5; si++) {
												String sortName = "";
												if (iterator.hasNext()) {
													sortBean = (SortBean) iterator.next();
													sortName = sortBean.getSortName();
												}
									%>
									<td>
										&nbsp;<a href="app/pre/search.do?sortId=<%=sortBean.getSortId() %>"><%=sortName%></a> </td>
									<%
										}
									%>
								</tr>
								<%
									i++;
									}
								%>
							</tbody>
						</table>
					</DIV>
				</td>
			</tr>
			<tr>
				<td><%=pageUtil.viewHTML()%></td>
			</tr>
		</table>
	</body>
</html>
